package drive.RemakeService.ServiceInterface;

import com.aliyuncs.exceptions.ClientException;
import drive.Model.Article;
import org.codehaus.jettison.json.JSONException;
import org.springframework.transaction.annotation.Transactional;

import java.io.IOException;
import java.util.List;

public interface TravelNoteService {


    @Transactional
    String publishTravelNote(Article article, List<String> img_url) throws JSONException, IOException;

    String browseTravelNotes(int articleID);

    String searchTravelNotes(String keyword, int PageNum, int PageSize);

    String reportTravelNote(String token, int articleID, String reason);

    String followTravelNoteAuthor(String roken,Integer authorID);

    String commentTravelNote(String token,Integer articleID, String comment, int parentCommentID);

    String getFirstImageByarticleID(int articleID);

    String getImageByarticleID(int articleID);

    String collectTravelNote(String token, int articleID);

    String getFirstImageByArticleID(int itemID);

    String getImageByArticleID(int itemID);

    @Transactional
    String deleteComment(int commentID);

    @Transactional
    String deleteFavorite(int favoriteID);

    String getFavoriteIdByUserAndArticle(int userID, int articleID);



    String image_back(String imageUrl, String originalFilename) throws IOException, ClientException;
}
